using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UselessExplorer
{
    public partial class frmPromptBox : Form
    {
        public frmPromptBox()
        {
            InitializeComponent();
            this.Left = 150;
            
        }

        private static frmPromptBox instance;
        public static frmPromptBox Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new frmPromptBox();
                }
                return instance;
            }
        }

        private bool isFolder;

        public bool IsFolder
        {
            get { return isFolder; }
            set { isFolder = value; }
        }

        private string fileName;

        public string FileName
        {
            get { return fileName; }
            set { fileName = value; }
        }

        private void frmPromptBox_Load(object sender, EventArgs e)
        {
            textBox1.Text = "";
            if (IsFolder)
            {
                label1.Text = "Folder Name";
            }
            else
            {
                label1.Text = "File Name";
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.FileName = textBox1.Text;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}